﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class news_view : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Label1.Text = "无此新闻！";
        string news_id = Request.QueryString["id"].ToString();
        MysqlHelp dataprovider = new MysqlHelp();
        string sql = "select * from news where id = '" + news_id + "'";
        DataTable recall = dataprovider.GetDatabysql(sql);
        if(recall.Rows.Count != 0)
        {
            this.Label1.Text = recall.Rows[0]["title"].ToString();
            this.Label2.Text = recall.Rows[0]["publishtime"].ToString();
            this.Label3.Text = recall.Rows[0]["publisherID"].ToString();
            this.Label4.Text = recall.Rows[0]["message"].ToString();
        }
    }
}
